<?php
             
    require("class.phpmailer.php");
    //include("smtp.inc.php");

    $mail             = new PHPMailer();

    $mail->IsSMTP();                           // telling the class to use SMT
    $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
    $mail->SMTPAuth   = true;                  // enable SMTP authentication

    $mail->Username   = "comounio@gmail.com";  // GMAIL username
    $mail->Password   = "mourinho";            // GMAIL password
    $mail->SetFrom('comounio@gmail.com', 'Comounio Team');
    $mail->AddReplyTo("comounio@gmail.com","Comounio Team");

    $address = "sioque@gmail.com";
    $mail->AddAddress($address, "Usuario de prueba");
    $mail->Subject    = "Registrado correctamente";
    $mail->Body = "Registrado correctamente. Gracias.";
    //$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
    
    if(!$mail->Send()){
      echo "Error: " . $mail->ErrorInfo;
    }else{
      echo "El Correo se ha enviado satisfactoriamente";
    }
?>
